A virtual machine monitor (“VMM”) creates an environment that allows multiple operating systems to run simultaneously on the same computer hardware. In such an environment, applications written for different operating systems (e.g., WINDOWS® operating system, LINUX® operating system) can be run simultaneously on the same hardware.
When an operating system (“OS”) is run on a VMM, unprivileged instructions of the operating system execute on the hardware at full hardware speed. However, most or all instructions that access a privileged hardware state trap to the VMM. The VMM simulates the execution of those instructions as needed to maintain the illusion that the operating system has sole control over the hardware on which it runs.
I/O handling involves two levels of device drivers for each device: one maintained by the VMM, and the other maintained by the operating system. When an application requests the operating system to perform an I/O function, the operating system invokes a device driver. That device driver then invokes the corresponding device driver maintained by the VMM to perform the I/O function. Similarly, when an I/O interrupt comes in, a VMM device driver handles the incoming interrupt and may deliver it to the corresponding device driver maintained by the operating system.
The VMM typically handles memory by managing memory translation in order to translate between the OS's use of physical memory, and the real “machine” memory present in hardware.
The VMM adds to the overhead of the computer. Adding the VMM's management of memory to the OS's own memory management slows memory access. The two layers of device drivers add to the overhead by increasing the amount of software that processes I/O requests and interrupts. Overhead is also added by constantly trapping and simulating privileged instructions, and by forcing I/O requests to go through two levels of device drivers. This overhead can slow interrupt handling, increase the fraction of CPU bandwidth lost to software overhead, increase response time, and decrease perceived performance.
The VMM is loaded during bootup of the computer and receives control of the hardware at boot time. The VMM maintains hardware control until the computer is shut down.
Since the VMM has hardware control from bootup to shutdown, overhead is incurred even when the VMM is not needed (for example, when only a single OS instance is running on the hardware). Thus the VMM can add unnecessary overhead to the computer.
It would be desirable to reduce the unnecessary overhead.